// 来源：https://www.peisebiao.com/info/cn.php
const colors: { bg: string, color: string, name: string }[] = [

    { color: '#ffffff', bg: '#000229', name: '黑', },
    { color: '#ffffff', bg: '#f94239', name: '', },
    { color: '#000000', bg: '#f6a04d', name: '', },
    { color: '#000000', bg: '#f3d321', name: '', },
    { color: '#000000', bg: '#00bc7b', name: '', },
    { color: '#ffffff', bg: '#486aff', name: '', },
    { color: '#ffffff', bg: '#4d49be', name: '', },
];

let _index = 0;
/**
 * 获取颜色 背景色和字体颜色交替
 * @returns 
 */
export function getColor() {
    if (_index >= colors.length) {
        _index = 0; // 重置索引
    }
    const index = _index;
    _index++;
    return colors[index];
}